<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

	<ui:composition 
	  xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      template="/view/templates/templateLayout.xhtml">
      
      <ui:define name="conteudo"> 
      <link rel="stylesheet" type="text/css" href="./estilos.css"/>      	
  	
<h:form id="formConsultarCondicaoPagamento">  
	<p:panel id="panelConsultarCondicaoPagamento" header="Consultar CondicaoPagamento" style="margin-bottom:20px; ">
	<f:facet name="header">
		<h:outputText value="Consultar Condicao de Pagamento" styleClass="outputTextTitulo"/>
	</f:facet>   
 	<p:messages id="messages" autoUpdate="true" closable="true" showDetail="true"/> 
    	<h:panelGrid id="idPanelGridCondicaoPagamento" columns="2" style="margin-top:20px; margin-right:10%;">  
            <h:outputLabel value="Forma de Pagamento" styleClass="outputLabel"/>  
            <h:outputLabel value="Condicao de Pagamento" styleClass="outputLabel"/> 
            
            <p:inputText value="#{condicaoPagamentoBean.condicaoPagamento.formaPagamento.descricao}" styleClass="inputDescricao"/>  
  			<p:inputText value="#{condicaoPagamentoBean.condicaoPagamento.descricao}" styleClass="inputDescricao"/>  
        </h:panelGrid>  
    </p:panel>  
    <p:commandButton value="Consultar" actionListener="#{condicaoPagamentoBean.findCondicaoPagamento}" update="dataTableCondicaoPagamento" styleClass="commandButton" /> 
	<p:commandButton value="Novo" action="#{condicaoPagamentoBean.newCondicaoPagamento}" styleClass="commandButton" /> 
	<p:commandButton value="Limpar"  actionListener="#{condicaoPagamentoBean.clean}" styleClass="commandButton" />
    		
   		
     <p:dataTable id="dataTableCondicaoPagamento" var="CondicaoPagamento" value="#{condicaoPagamentoBean.dmCondicaoPagamento}"  
    			 selectionMode="single"
                 style="padding-top:20px; width:40%">  
        <f:facet name="header">Condições de Pagamento</f:facet>    
		<p:column style="width:10%">  
            <f:facet name="header">  
                <h:outputText value="Código" />  
            </f:facet>  
            <h:outputText value="#{CondicaoPagamento.idCondicaoPagamento}" />  
        </p:column>  
  
        <p:column>  
            <f:facet name="header">  
                <h:outputText value="CondicaoPagamento" />  
            </f:facet>  
            <h:outputText value="#{CondicaoPagamento.descricao}" />  
        </p:column>  
        
        <p:column>  
            <f:facet name="header">  
                <h:outputText value="Forma de Pagamento" />  
            </f:facet>  
            <h:outputText value="#{CondicaoPagamento.formaPagamento.descricao}" />  
        </p:column>  
        
        <p:column style="width:4%; text-align:center">  
        	<f:facet name="header">
        	 <h:outputText value="Editar" />
        	</f:facet>
         	<p:commandButton id="selectButtonEditar" action="#{condicaoPagamentoBean.editarCondicaoPagamento}" icon="ui-icon-pencil" process="@this" title="Detail" />
        </p:column> 
        
        <p:column style="width:4%; text-align:center">  
        	<f:facet name="header">
        	 <h:outputText value="Excluir" />
        	</f:facet>
         	<p:commandButton id="selectButtonDelete" action="#{condicaoPagamentoBean.excluirCondicaoPagamento}" icon="ui-icon-trash" process="@this" title="Delete" />

        </p:column>
    </p:dataTable>   
 
</h:form>  	


</ui:define>
</ui:composition>
